@echo off

::check-commit hook

::是否开启调试日志输出,是:Y,否:N
set debug=Y
::改变的文件列表
set files=%1
::把创建时间距离现在大于logTime秒的日志文件删除，0则不删除
set logTime=43200
set a=%2
set b=%3

::for /F "tokens=*" %%m in ('D:/zhh/work/svnHook/checkTS.exe %files%') do (echo abc=%%m >&2)
for /F "tokens=*" %%m in ('D:/zhh/work/svnHook/checkTS.exe -file %files% -logTime %logTime% -debug %debug% -a %a% -b %b%') do (
::获取exe文件的输出状态码
set retCode=%%m
echo %%m >&2
)


::echo ret=%retCode% >&2

if %retCode% equ YES (goto suc) else (goto err)

:suc
exit 0

:err
echo 请点击[Abort]并且不要提交,先规范处理代码 >&2
echo 如有误判点击[x]会继续执行提交 >&2
exit 1

pause


